﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Common_SuccessfulLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lbUsername.Text = Request.QueryString["username"];
        if (Session["Authentication"].ToString() == "2")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Delay then redirect", "<script type=text/javascript>delayRedirect('/Default.aspx');</script>");
        }
        else if (Session["Authentication"].ToString() == "1")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Delay then redirect", "<script type=text/javascript>delayRedirect('/cp/employee/employee.aspx');</script>");
        }
        else if (Session["Authentication"].ToString() == "0")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Delay then redirect", "<script type=text/javascript>delayRedirect('/cp/admin/admin.aspx');</script>");
        }
    }
}
